home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1994.11.gz / 1994.11 / 000108_swift@acs.bu.edu_Thu Nov 17 01:39:40 1994.msg < prev    next >
Internet Message Format  |  1994-11-30  |  4KB

  1. Received: from acs3 (ACS3.BU.EDU) by cs.umb.edu with SMTP id AA00866
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 17 Nov 1994 07:01:43 -0500
  3. Received: by acs3 (8.6.9/BU_Server-1.1)
  4.     id GAA108215; Thu, 17 Nov 1994 06:39:41 -0500
  5. From: swift@acs.bu.edu (Matthew Swift)
  6. Message-Id: <199411171139.GAA108215@acs3>
  7. Date: Thu, 17 Nov 94 06:39:40 -0500
  8. Reply-To: swift@bu.edu
  9. To: tex-k@cs.umb.edu
  10. Subject: cmdline -D and mode clash solved
  11.  
  12.  
  13. Recently I reported that invoking dvipsk with the "-D" command line option
  14. caused it to ignore the metafont mode specified with an entry in config.ps,
  15. and revert to mode cx.
  16.  
  17. At the time, I was not sure whether it was getting the cx from the value of
  18. "localfont" built into the mf.base and initialized from $texmf/mf/modes.mf, or
  19. from somewhere else.
  20.  
  21. The answer is easy.  The code in dvips.c explicitly sets the mode to NULL
  22. whenever -D is specified from the command line.  If the mode is NULL, a
  23. default defined in config.h is used, and that default is cx.
  24.  
  25. It's even got a comment in dvips.c:
  26.  
  27.               /* If we had the mode from the config file, don't use it.
  28.                   If they specified one with -mode, keep it.  */
  29.                if (!mfmode_option)
  30.                  mfmode = NULL;
  31. [much code]
  32.    /* If no mode specified yet, use compile-time default.  */
  33.    if (!mfmode)
  34.      mfmode = MFMODE;
  35.  
  36. -------------------------------
  37.  
  38. That comment should specifically read "config.ps" file, because a
  39. "config.printer" file _can_ set the mode with "-D" is used, if it is
  40. explicitly loaded with the -P cmdline option (if the printer is used as a
  41. default, I suppose the config.printer is not read), AND the -P option comes
  42. AFTER the -D option on the command-line!
  43.  
  44. --------------------------
  45.  
  46. OK, so this note is to say what I thought was a bug is a feature, though its
  47. documentation could be improved. 
  48.  
  49. Next, though, I wonder why it is a feature.  First, I think the dependence on
  50. command-line order is very sketchy and confusing.  And second, though I do not
  51. understand the details of resolutions and modes, I think that in the situation
  52. that a resolution is specified without a mode, it makes more sense to have the
  53. default be the one in config.ps, not the (compiled) one in config.h.  Both are
  54. factory set to cx, but it is much more  convenient and therefore much more
  55. likely and more preferable to change config.ps, instead of changing config.h
  56. and recompiling.  I think the value in config.h should be a last resort to
  57. keep from crashing.  
  58.  
  59. Of course if there is a good reason for the way it is, it should stay -- I am
  60. not qualified to decide.
  61.  
  62.  
  63. NeXT computers:
  64.  
  65. The issue came up for me because when you print from NeXT's texview program,
  66. it uses  -D but does not use -mode.  Fortunately, it specifies -P also,
  67. so that the easy workaround is to have the line:
  68.  
  69.     M nexthi
  70.  
  71. in both config.ps and config.printer.
  72.  
  73. I could also change the sources for texview, of course, if I dare mess with
  74. objective C. 
  75.  
  76. I have hacked the sources of texview (nextstep 3.0 motorola) and the
  77. NeXT-supplied MakeTeXPK so that they now work nicely side-by-side with the
  78. kpathsea distribution of tex and dvips.  If anything thinks I should post them
  79. somewhere, just let me know.
  80.  
  81. Matt
  82.  
  83. PS  I never did find out why, when kpathsea and MakeTeXPK built a cx pk-font
  84. under the above conditions, it caused a different size than it was looking for
  85. to be generated, so that kpathsea would cause a font to be built, and then
  86. reject it.   This seems like another problem to me.